<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr  = [];
        for(var i  = 2;i<=100;i++)
        {
            for(var k=2;k<=i-1;k++ )
            {
                if(i%k==0)
                {
                    break;
                }
            }
            if(k==i)
            document.write(i+",");

        }
       
    </script>
</body>
</html>